
<?php if (!empty($this->loved_tracks->track)): ?>
<p>
<?php echo $this->translate("My Loved Tracks") ?>
</p>

<?php foreach ($this->loved_tracks->track as $track): ?>
<span class='leftSubBox'>
<?php $track_name = (string)$track->artist->name. ' - '. (string)$track->name ?>
<?php if (!empty($track->image[0])): ?>
<img src="<?php echo $track->image[0] ?>" alt="<?php echo $this->escape((string)$track->artist->name) ?>" style="width: 36px; max-height: 50px;" />
<?php endif ?>
<?php echo $this->escape($track_name) ?>

<a href="<?php echo $this->url(array('action' => 'play-track', 'controller' => 'playlist'), 'default', true) ?>?track-name=<?php echo urlencode($track_name) ?>">
    <?php echo $this->translate("Play") ?>
</a>
</span>
<?php endforeach ?>
<?php endif ?>


<p>
    <?php echo $this->translate("My Top Tracks") ?>
</p>
<?php foreach ($this->top_tracks->track as $track): ?>
<span class='leftSubBox'>
<?php $track_name = (string)$track->artist->name. ' - '. (string)$track->name ?>

<?php if (!empty($track->image[0])): ?>
<img src="<?php echo $track->image[0] ?>" alt="<?php echo $this->escape((string)$track->artist->name) ?>" style="width: 36px; max-height: 50px;"  />
<?php endif ?>
<?php echo $this->escape($track_name) ?>

<a href="<?php echo $this->url(array('action' => 'play-track', 'controller' => 'playlist'), 'default', true) ?>?track-name=<?php echo urlencode($track_name) ?>">
    <?php echo $this->translate("Play") ?>
</a>

</span>
<?php endforeach ?>